JAVA代码问题```

来源:百度知道 编辑:UC知道 时间:2024/05/19 03:30:37
import java.awt.Container;
import java.awt.BorderLayout;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import javax.swing.JOptionPane;

public class JOptionPane
{
public static void main(String[] args)
{
JOptionFrame frame = new JOptionFrame();
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.show();
}
}

class JOptionFrame extends JFrame
{
private static final int WIDTH = 500;
private static final int HEIGHT = 400;
private JButton one;
private JButton two;
private JButton three;
private JButton four;

public JOptionFrame()
{
setSize(WIDTH,HEIGHT);
setTitle("框架测试");
setResizable(false);

one = n

import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
import javax.swing.JOptionPane;

public class JOptionPane_1 {
public static void main(String[] args) {
JOptionFrame frame = new JOptionFrame();
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.show();
}
}

class JOptionFrame extends JFrame {
private static final int WIDTH = 500;
private static final int HEIGHT = 400;
private JButton one;
private JButton two;
private JButton three;
private JButton four;
public JOptionFrame() {
setSize(WIDTH, HEIGHT);
setTitle("框架测试");
setResizable(false);

one = new JButton("Show Message Dialog");
two = new JButton("Show Confirm Dialog");
three = new JButton("Show Option Dialog");
fou